/*
* @Description: request
* @Verson: v1.0
* @Author: xvyy
* @Date: 2024-11-29 20:49
*/
import axiox from 'axios'

const request = axiox.create({
    baseURL: 'http://localhost:8080/',
    timeout: 3000
})
// 请求拦截器
request.interceptors.request.use(
    //设置请求头配置信息
    config => {
        // 处理请求头
        return config
    },
    // 请求失败
    error => {
        return Promise.reject(error)
    }
)
// 响应拦截器
request.interceptors.response.use(
    response => {
        return response
    },
    errot => {
        return Promise.reject(errot)
    }
)

// 导出
export default request
